package Leo.serviceClient;

import Leo.serviceClient.ribbon.RibbonConfig;
import Leo.serviceClient.ribbon.SecondRibbonConfig;
import com.sun.deploy.util.SessionState;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.feign.FeignClientsConfiguration;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;

@SpringBootApplication
@EnableDiscoveryClient //可以发现eureka的服务
@RibbonClients(value = {@RibbonClient(name = "FAQ-Service-Provider",configuration = SecondRibbonConfig.class),
        @RibbonClient(name = "Second-Provider",configuration = RibbonConfig.class)})
//@RibbonClients(defaultConfiguration = RibbonConfig.class)
@EnableFeignClients //启用feign
@EnableCircuitBreaker //启用Hystrix
@EnableHystrixDashboard //启动Hystrix的可视化监控
public class FaqClient {
    public static void main(String[] args) {
        SpringApplication.run(FaqClient.class,args);
    }
}
